﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace StructureDiagram
{
    public class TextDiagramElement: DiagramElement
    {
        string text;

        //

        /// <summary>
        /// Creation an empty text diagram element
        /// </summary>
        public TextDiagramElement()
        {
            text = "";
        }

        /// <summary>
        /// Initialization of the text diagram element with text string
        /// </summary>
        /// <param name="text">Text string for this element</param>
        public TextDiagramElement(string text)
        {
            this.text = text;
        }

        /// <summary>
        /// Text, element contains which
        /// </summary>
        public string Text
        {
            get { return text; }
            set { text = value; }
        }

        /// <summary>
        /// String representation of the diagram element 
        /// </summary>
        /// <returns>Text of the diagram element</returns>
        public override string ToString()
        {
            return text;
        }
    }
}
